<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" +request.getServerPort() + path + "/";
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
 <link rel="stylesheet" type="text/css" href="../Styles/admin-all.css" />
  <link rel="stylesheet" type="text/css" href="../layui/css/layui.css" />

    <link rel="stylesheet" type="text/css" href="../Styles/base.css" />
    <link rel="stylesheet" type="text/css" href="../Styles/bootstrap.min.css" />
    <script type="text/javascript" src="../Scripts/jquery.min.js"></script>
    <script type="text/javascript" src="../Scripts/bootstrap.min.js"></script>
    <script type="text/javascript" src="../Scripts/index.js"></script>
    <script type="text/javascript" src="<%=basePath %>/js/vue.min.js"></script>
    <script type="text/javascript" src="../layui/layui.js"></script>
    <script src="<%=basePath %>/laypage/laypage.js"></script>
    <style type="text/css">
	
	li{list-style:none}
	#box{
		margin-left: 50px;
	
	}
</style>
</head>
<body>
<div>
<a href="<%=basePath%>/selectPriviege?roleid={{list.roleid}}"><i class="layui-icon" style="font-size: 20px; color: #1E9FFF;">&#xe631;</i></a>
<div id="box">
<table class="table  table-bordered" style="text-align: center">
 		<tr>角色列表<div align="right" ><a data-toggle="modal" data-target="#myModal"><i class="layui-icon" style="font-size: 15px; color: #1E9FFF;">&#xe654;添加</i></a></div></tr>
 		<hr>
 		<tr class="success" >
					<td>排序</td>
					<td>ID</td>
					<td>名称</td>
					<td >操作</td>
		</tr>
		<tr v-for="(index,list) in roleList">
			<td>{{index+1}}</td>
			<td>{{list.roleid}}</td>
			<td>{{list.rolename}}</td>
			<td><a href="<%=basePath%>/selectPriviege?roleid={{list.roleid}}">设置权限</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<!-- 	<span data-toggle="modal"  data-target="#MyModalUp" onclick="updateId({{list.roleid}})"><i class="layui-icon" style="font-size: 20px">&#xe642;</i></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span data-toggle="modal" data-target="#MyModalDel"  onclick="deleteId({{list.roleid}})">
			<i class="layui-icon" style="font-size: 20px;">&#xe640;</i></span> --></td>
		</tr>
 	</table>
</div>
</div>

</body>
<script type="text/javascript">
var vnm=new Vue({
	el:"#box",
	data:{
		data:[],
		roleList:'',
	},

methods:{
	roleLis:function(){
		var dom=this;
		$.ajax({
			url:'../selectAllRoleList',
			dataType:'json',
			success:function(res){
				dom.roleList=res.allRoleList;
			}
		})	
	}
},
created:function(){
	this.roleLis();
	
},
})
</script>

</html>